package com.hiyee.platform.service.impl;

import com.hiyee.platform.service.RabbitMqService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;
@Service
public class RabbitMqServiceImpl implements RabbitMqService {

    @Autowired
    RabbitTemplate rabbitTemplate;

    @Override
    public void publish(Map message) {
        rabbitTemplate.convertAndSend(EXCHANGE, null, message);
    }
}
